# 1 "C:/Bruker/TopSpin3.2_PL6/exp/stan/nmr/lists/pp/user/cp3lev_echo1D.ajr"
;cp (TopSpin 2.0)

;basic cp experiment
;written by HF 1.3.2001
;changed by JOS 05/06/03
;comments added by STE 4.4.2006

;Avance II+ version
;parameters: 
;p3 : proton 90 at power level pl2
;p15 : contact time at pl1 (f1) and pl2 (f2)
;pl1 : X power level during contact
;sp0 : proton power level during contact
;l20 : number of rotor cycles for echo delay
;pl2 : 1H power for pulses
;pl12 : decoupling power level (if not pl13)
;pl13 : special decoupliong power level
;d1 : recycle delay
;cnst31 : spinning rate
;pcpd2 : pulse length in decoupling sequence
;cpdprg2 : cw, tppm (at pl12), or lgs, cwlg. cwlgs (LG-decoupling 
;spnam0 : use e.g. ramp.100 for variable amplitude CP
;here pl13 is used instead of pl12)
;zgoptns : -Dfslg, -Dlacq, or blank
# 26 "C:/Bruker/TopSpin3.2_PL6/exp/stan/nmr/lists/pp/user/cp3lev_echo1D.ajr"
;$COMMENT=basic cp experiment, arbitrary contact and decoupling schemes
;$CLASS=Solids
;$DIM=1D
;$TYPE=cross polarisation
;$SUBTYPE=simple 1D
;$OWNER=belena

# 1 "C:/Bruker/TopSpin3.2_PL6/exp/stan/nmr/lists/pp/Avancesolids.incl" 1
;Avancesolids.incl
;   for TCU3
;
;version 1 28.2.2001, written by HF
;	   4.4.2006, complemented by Ste

;$CLASS=Solids INCL
;$COMMENT=definitions for setrtp and setnmr
# 10 "C:/Bruker/TopSpin3.2_PL6/exp/stan/nmr/lists/pp/Avancesolids.incl"
;switch between 1H or 19F output (H amplifier) 


# 14 "C:/Bruker/TopSpin3.2_PL6/exp/stan/nmr/lists/pp/Avancesolids.incl"
;gating pulse for RX, ADC and HPPR auto mode


# 18 "C:/Bruker/TopSpin3.2_PL6/exp/stan/nmr/lists/pp/Avancesolids.incl"
;explicit blanking of preamp, receiver, adc, not implemented yet


# 26 "C:/Bruker/TopSpin3.2_PL6/exp/stan/nmr/lists/pp/Avancesolids.incl"
;generate dwell clock


;turn dwell clock on/off
# 32 "C:/Bruker/TopSpin3.2_PL6/exp/stan/nmr/lists/pp/Avancesolids.incl"
;


# 36 "C:/Bruker/TopSpin3.2_PL6/exp/stan/nmr/lists/pp/Avancesolids.incl"
;define data sampling for WAHUHA type experiments, samples analogue or digitally for d9, closes receiver


# 40 "C:/Bruker/TopSpin3.2_PL6/exp/stan/nmr/lists/pp/Avancesolids.incl"
;explicit transmitter blanking, not supported yet

;NCO switching, to be implemented

;$id: $
# 33 "C:/Bruker/TopSpin3.2_PL6/exp/stan/nmr/lists/pp/user/cp3lev_echo1D.ajr" 2
# 35 "C:/Bruker/TopSpin3.2_PL6/exp/stan/nmr/lists/pp/user/cp3lev_echo1D.ajr"
;cnst11 : to adjust t=0 for acquisition, if digmod = baseopt
"acqt0=1u*cnst11"

define delay del25
"del25=(l20*(1s/cnst31)-p2/2-1u)"
define delay del26
"del26=(l20*(1s/cnst31)-p2/2-de-1u)"

# 1 "mc_line 44 file C:/Bruker/TopSpin3.2_PL6/exp/stan/nmr/lists/pp/user/cp3lev_echo1D.ajr dc-measurement inserted automatically"

    dccorr
# 44 "C:/Bruker/TopSpin3.2_PL6/exp/stan/nmr/lists/pp/user/cp3lev_echo1D.ajr"
# 44 "C:/Bruker/TopSpin3.2_PL6/exp/stan/nmr/lists/pp/user/cp3lev_echo1D.ajr"
1 ze
  30m
2 d1 do:f2 
# 1 "C:/Bruker/TopSpin3.2_PL6/exp/stan/nmr/lists/pp/p15_prot.incl" 1
;p15_prot.incl
;avance-version (13/01/29)
;Test the rf on-time and duty cycle
;protect against too long contact time
;Test the rf on-time and duty cycle 
;
;$CLASS=Solids INCL
;$COMMENT=protect against too long contact time


1m
if "p15 < 10.1m" goto Passp15
2u
print "contact time exceeds 10msec limit!"
goto HaltAcqu
Passp15, 1m
# 20 "C:/Bruker/TopSpin3.2_PL6/exp/stan/nmr/lists/pp/p15_prot.incl"
;$Id: p15_prot.incl,v 1.2.18.4 2013/01/29 15:40:51 ber Exp $
# 47 "C:/Bruker/TopSpin3.2_PL6/exp/stan/nmr/lists/pp/user/cp3lev_echo1D.ajr" 2

			;make sure p15 does not exceed 10 msec	
			;let supervisor change this pulseprogram if 
			;more is needed

			;disable protection file for long acquisition change decoupling power !!! or you risk probe damage
			;if you set the label lacq (ZGOPTNS -Dlacq), the protection is disabled
# 1 "C:/Bruker/TopSpin3.2_PL6/exp/stan/nmr/lists/pp/aq_prot.incl" 1
;aq_prot.incl
;avance-version (13/01/28)
;Test the rf on-time and duty cycle
;protect against too long acquisition time

;$CLASS=Solids INCL
;$COMMENT=protect against too long acquisition time

1m
if "aq < 50.1m" goto Passaq
2u 
print "acquisition time exceeds 50m limit!"
goto HaltAcqu
Passaq, 1m
# 16 "C:/Bruker/TopSpin3.2_PL6/exp/stan/nmr/lists/pp/aq_prot.incl"
;$Id: aq_prot.incl,v 1.2.18.4 2013/01/28 17:40:19 ber Exp $
# 55 "C:/Bruker/TopSpin3.2_PL6/exp/stan/nmr/lists/pp/user/cp3lev_echo1D.ajr" 2

			;allows max. 50 msec acquisition time, supervisor
			;may change  to max. 1s at less than 5 % duty cycle
			;and reduced decoupling field

3 5m 
  ;"del25=(l20*(1s/cnst31)-p2/2-1u)"
  ;"del26=(l20*(1s/cnst31)-p2/2-de-1u)"
  20m
  (p3 pl2 ph1):f2
  (p15 pl1 ph2):f1 (p15:sp0 ph10):f2
  1u cpds2:f2 		;pl12 is used here with tppm, pl13 with cwlg, cwlgs
  del25
  (p2 pl11 ph4):f1
  del26
  1u 
  go=2 ph31
  1m do:f2
  wr #0
HaltAcqu, 1m
exit
# 77 "C:/Bruker/TopSpin3.2_PL6/exp/stan/nmr/lists/pp/user/cp3lev_echo1D.ajr"
ph0= 0
ph1= 1 3
ph2= 0 0 2 2 ;1 1 3 3
ph4= 0 0 0 0 2 2 2 2  
ph10= 0
ph31= 0 2 2 0 ;1 3 3 1

